package com.whfc.mach.dao;

import com.whfc.mach.dto.report.AppMachReportDTO;
import com.whfc.mach.entity.AppMachMonthReport;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface AppMachMonthReportMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AppMachMonthReport record);

    int insertSelective(AppMachMonthReport record);

    AppMachMonthReport selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AppMachMonthReport record);

    int updateByPrimaryKey(AppMachMonthReport record);

    /**
     * 根据时间查找设备月报
     *
     * @param deptId
     * @param startDate
     * @param endDate
     * @return
     */
    List<AppMachReportDTO> selectByDeptIdAndTime(@Param("deptId") Integer deptId,
                                                 @Param("startDate") Date startDate,
                                                 @Param("endDate") Date endDate);
}